package Zuoye7;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MapList {
    public static void main(String[] args) {
        List<Map<String, String>> list = new ArrayList<>();
        Map<String, String> m = new HashMap<>();
        m.put("name", "张三");
        m.put("id","1");
        m.put("age", "18");
        list.add(m);

        Map<String, String> m2 = new HashMap<>();
        m2.put("name", "王五");
        m2.put("id", "2");
        m2.put("age", "18");
        list.add(m2);


            for (Map<String, String> map : list){
            System.out.println(map);
        }

    }
}

